package cn.zhsq.order.controller;

import cn.zhsq.common.vo.JsonResult;
import cn.zhsq.fw.api.dto.Person;
import cn.zhsq.fw.api.feign.FwFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/app/order")
public class OrderController {
    @Autowired
    private FwFeign fwFeign;

    @GetMapping
    public JsonResult<String> add() {
        Person p = new Person();
        p.setUsername("我上早八");
        return JsonResult.ok("OK", fwFeign.hello(p));
    }
}
